package synchronized面试题.Test02;

public class MyRunnable implements Runnable {
    private MyClass mc;

    public MyRunnable(MyClass mc) {
        this.mc = mc;
    }

    @Override
    public void run() {
        if (Thread.currentThread().getName().equals("t1")){
            mc.abc();
        }
        if (Thread.currentThread().getName().equals("t2")){
            mc.def();
        }
    }
}
